idf_component_register(
    SRCS "approxy4esp.c"
        "aes.c"
        "approxy4esp.c"
        "cJSON.c"
        "hex.c"
        "im4c.c"
        "md5.c"
        "protocol.c"
        "socket_wrapper.c"
    INCLUDE_DIRS "."
    REQUIRES driver esp_common freertos
)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=address -Wno-unused-but-set-variable -Wno-parentheses -Wno-error=pointer-sign")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=address -Wno-unused-but-set-variable -Wno-parentheses -Wno-error=pointer-sign")


# # 设置特定组件的日志级别
# set(COMPONENT_LOG_LEVEL debug)  # 可选：error, warning, info, debug, verbose
# set(COMPONENT_REQUIRES "esp_log")  # 确保包含esp_log组件